<!-- AddContract -->
<template>
  <div class="app-container">
    <div class="mb-3 mt-3">新增签约</div>
      <Form @updateEvent="updateEvent" />
  </div>
</template>

<script>
import { way } from './config'
import { uploadFile } from '@/api/customer'
import Form from './Form.vue'
export default {
  components: { Form },
  data() {
    return {
      value: '',
      loading: false,
      form: {},
      options: [],
      way,
      dialogImageUrl: '',
      dialogVisible: false,
      fileList: []
    }
  },
  computed: {},
  watch: {},
  methods: {
    remoteMethod() {
    },
    onSubmit() {

    },
    handleRemove(file, fileList) {
      console.log(file, fileList)
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url
      this.dialogVisible = true
    },
    uploadFile(params) {
      const data = new FormData()
      data.append('file', params.file)
      uploadFile(data, (progressEvent) => {
        const percent = (progressEvent.loaded / progressEvent.total * 100) | 0
        params.onProgress({ percent: percent })
      }).then(res => {

      })
    }
  },
  created() {

  },
  mounted() {

  }
}
</script>
<style lang='scss' scoped>
//@import url(); 引入公共css类
</style>
